package hw2.jpa.strategy;

import java.io.Serializable;

import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

import hw2.jpa.model.Contract;

@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "STRATEGY_TYPE")
public abstract class RecognitionStrategy implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue
	private Long id;

	public abstract void calculateRevenueRecognitions(Contract contract);

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

}
